--[[
Project: HunterRP
File: door_funcs.lua
Author: Sebihunter
]]--

--Parts of this file taken from "DarkRP"
local meta = FindMetaTable("Entity")

function meta:IsOwnable()
	local class = self:GetClass()

	if (class == "func_door" or class == "func_door_rotating" or class == "prop_door_rotating") or
		class == "prop_vehicle_jeep" or class == "prop_vehicle_airboat" then
			if meta:GetNWInt("ownable") == 1 then
				return true
			end
			return false
	end
	return false
end

function meta:IsDoor()
	local class = self:GetClass()

	if class == "func_door" or
		class == "func_door_rotating" or
		class == "prop_door_rotating" then
		return true
	end
	return false
end

function meta:IsVehicle()
	local class = self:GetClass()

	if class == "prop_vehicle_jeep" or
		class == "prop_vehicle_airboat" then
		return true
	end
	return false
end